package com.lagou.sqlsession;

import com.lagou.pojo.Configuration;
import com.lagou.pojo.MapperStatement;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @ClassName: Executor
 * @Description:
 * @Author: qiaojiacheng
 * @Date: 2021/7/22 4:49 下午
 */
public interface Executor {

    /**
     * 进行查询
     *
     * @param
     * @return
     * @author qiaojiacheng
     * @date 2021/7/29 4:25 下午
     */
    public <E> List<E> query(Configuration configuration, MapperStatement mapperStatement, Object... params) throws SQLException, NoSuchFieldException, IllegalAccessException, IntrospectionException, InvocationTargetException, InstantiationException;

    /**
     * 进行增加、删除、更新操作
     *
     * @param
     * @return
     * @author qiaojiacheng
     * @date 2021/7/29 4:25 下午
     */
    public int update(Configuration configuration, MapperStatement mapperStatement, Object... params) throws SQLException, NoSuchFieldException, IllegalAccessException, IntrospectionException, InvocationTargetException, InstantiationException;

}
